package singleton;

public class Test {
    public static void main(String[] args) {
//        new Thread(() -> System.out.println(LazySingleton.getInstance())).start();
//        new Thread(() -> System.out.println(LazySingleton.getInstance())).start();

//        new Thread(() -> System.out.println(LazyDoubleCheckSingleton.getInstance())).start();
//        new Thread(() -> System.out.println(LazyDoubleCheckSingleton.getInstance())).start();

//        new Thread(() -> System.out.println(HungrySingleton.getInstance())).start();
//        new Thread(() -> System.out.println(HungrySingleton.getInstance())).start();

//        new Thread(() -> System.out.println(InnerClassSingleton.getInstance())).start();
//        new Thread(() -> System.out.println(InnerClassSingleton.getInstance())).start();

        new Thread(() -> System.out.println(System.identityHashCode(EnumSingleton.getInstance()))).start();
        new Thread(() -> System.out.println(System.identityHashCode(EnumSingleton.getInstance()))).start();

    }
}
